import {NgModule} from '@angular/core';
import {CommonModule, DatePipe} from '@angular/common';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {RouterModule} from '@angular/router';
import {sharedModule} from '../../sharedModule/shared.module';
import {DemoNgZorroAntdModule} from '../../NG-ZORRO/ng-zorro-antd.module';
import {NzIconModule} from 'ng-zorro-antd/icon';
import {IconDefinition} from '@ant-design/icons-angular';
import {AlertFill} from '@ant-design/icons-angular/icons';
import {RechargeRoutingModule} from './recharge-routing.module';
import {OrderListComponent} from './order/order-list/order-list.component';
import {OrderDetailComponent} from './order/order-detail/order-detail.component';
import {RechargeFollowUpComponent} from './compontents/follow-up/follow-up.component';

const icons: IconDefinition[] = [AlertFill];

import {
  RechargeOrderStatePipe,
  CollectionStatusPipe,
  PayTypeStatusPipe
} from './order/recharge-order.pipe';
import {PromotionComponent} from './promotion/promotion.component';
import {ConfigComponent} from './config/config.component';
import {PromotionEditComponent} from './promotion/promotion-edit/promotion-edit.component';
import {PromotionDetailComponent} from './promotion/promotion-detail/promotion-detail.component';

const pieArrs = [
  RechargeOrderStatePipe,
  CollectionStatusPipe,
  PayTypeStatusPipe
];

@NgModule({
  declarations: [
    ...pieArrs,
    RechargeFollowUpComponent,
    OrderListComponent,
    OrderDetailComponent,
    PromotionComponent,
    ConfigComponent,
    PromotionEditComponent,
    PromotionDetailComponent,
  ],
  imports: [
    RechargeRoutingModule,
    CommonModule,
    FormsModule,
    ReactiveFormsModule,
    RouterModule,
    sharedModule,
    DemoNgZorroAntdModule,
    NzIconModule.forRoot(icons),
  ],
  providers: [DatePipe]
})
export class RechargeModule {
}
